function! plugin#vim_ctrlspace#load() abort
    if !exists("g:CtrlSpaceLoaded")
        packadd vim-ctrlspace
    endif
    return exists("g:CtrlSpaceLoaded")
endfunction

function! plugin#vim_ctrlspace#init() abort
    let g:airline#extensions#ctrlspace#enabled = 1
    if plugin#vim_ctrlspace#load()
        nnoremap <m-space> :CtrlSpace<cr>
    endif
endfunction

